/**
 * @param {string} s
 * @param {number} k
 * @return {number}
 */
var maxVowels = function(s, k) {
    const n  = s.length;
    let ans = 0;
    let vowel = 0;
    for (let i = 0;i<s.length;i++){
        if( s[i] === 'a'|| s[i]==='e'|| s[i]==='i'||s[i]==='o'||s[i]==='u'){
            vowel++;
        }
        const left = i -k + 1;
        if(left < 0){
            continue;
        }
        ans = Math.max(ans,vowel)
        let out = s[left];
        if(out === 'a'|| out==='e'|| out==='i'|| out==='o'|| out==='u'){
            vowel--
        }
    }
    return ans;

};

console.log(maxVowels("ahfsuav",1));